package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName competition_catalog
 */
@TableName(value ="competition_catalog")
@Data
public class CompetitionCatalog implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String competitionName;

    /**
     * 
     */
    private String organizer;

    /**
     * 国家级/省级/市级/校级
     */
    private Object level;

    /**
     * 竞赛类别
     */
    private Object category;

    /**
     * 是否学校认定(创新创业学院认定)
     */
    private Integer isOfficial;

    /**
     * 是否团体赛
     */
    private Integer isTeamCompetition;

    /**
     * 一等奖分值
     */
    private Double firstPrizeScore;

    /**
     * 二等奖分值
     */
    private Double secondPrizeScore;

    /**
     * 三等奖分值
     */
    private Double thirdPrizeScore;

    /**
     * 特等奖处理方式: upgrade-按一等奖计, separate-单独设置分值
     */
    private String specialPrizeHandling;

    /**
     * 特等奖分值(如有)
     */
    private Double specialPrizeScore;

    /**
     * 生效日期
     */
    private Date effectiveDate;

    /**
     * 竞赛说明
     */
    private String description;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CompetitionCatalog other = (CompetitionCatalog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCompetitionName() == null ? other.getCompetitionName() == null : this.getCompetitionName().equals(other.getCompetitionName()))
            && (this.getOrganizer() == null ? other.getOrganizer() == null : this.getOrganizer().equals(other.getOrganizer()))
            && (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
            && (this.getCategory() == null ? other.getCategory() == null : this.getCategory().equals(other.getCategory()))
            && (this.getIsOfficial() == null ? other.getIsOfficial() == null : this.getIsOfficial().equals(other.getIsOfficial()))
            && (this.getIsTeamCompetition() == null ? other.getIsTeamCompetition() == null : this.getIsTeamCompetition().equals(other.getIsTeamCompetition()))
            && (this.getFirstPrizeScore() == null ? other.getFirstPrizeScore() == null : this.getFirstPrizeScore().equals(other.getFirstPrizeScore()))
            && (this.getSecondPrizeScore() == null ? other.getSecondPrizeScore() == null : this.getSecondPrizeScore().equals(other.getSecondPrizeScore()))
            && (this.getThirdPrizeScore() == null ? other.getThirdPrizeScore() == null : this.getThirdPrizeScore().equals(other.getThirdPrizeScore()))
            && (this.getSpecialPrizeHandling() == null ? other.getSpecialPrizeHandling() == null : this.getSpecialPrizeHandling().equals(other.getSpecialPrizeHandling()))
            && (this.getSpecialPrizeScore() == null ? other.getSpecialPrizeScore() == null : this.getSpecialPrizeScore().equals(other.getSpecialPrizeScore()))
            && (this.getEffectiveDate() == null ? other.getEffectiveDate() == null : this.getEffectiveDate().equals(other.getEffectiveDate()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCompetitionName() == null) ? 0 : getCompetitionName().hashCode());
        result = prime * result + ((getOrganizer() == null) ? 0 : getOrganizer().hashCode());
        result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
        result = prime * result + ((getCategory() == null) ? 0 : getCategory().hashCode());
        result = prime * result + ((getIsOfficial() == null) ? 0 : getIsOfficial().hashCode());
        result = prime * result + ((getIsTeamCompetition() == null) ? 0 : getIsTeamCompetition().hashCode());
        result = prime * result + ((getFirstPrizeScore() == null) ? 0 : getFirstPrizeScore().hashCode());
        result = prime * result + ((getSecondPrizeScore() == null) ? 0 : getSecondPrizeScore().hashCode());
        result = prime * result + ((getThirdPrizeScore() == null) ? 0 : getThirdPrizeScore().hashCode());
        result = prime * result + ((getSpecialPrizeHandling() == null) ? 0 : getSpecialPrizeHandling().hashCode());
        result = prime * result + ((getSpecialPrizeScore() == null) ? 0 : getSpecialPrizeScore().hashCode());
        result = prime * result + ((getEffectiveDate() == null) ? 0 : getEffectiveDate().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", competitionName=").append(competitionName);
        sb.append(", organizer=").append(organizer);
        sb.append(", level=").append(level);
        sb.append(", category=").append(category);
        sb.append(", isOfficial=").append(isOfficial);
        sb.append(", isTeamCompetition=").append(isTeamCompetition);
        sb.append(", firstPrizeScore=").append(firstPrizeScore);
        sb.append(", secondPrizeScore=").append(secondPrizeScore);
        sb.append(", thirdPrizeScore=").append(thirdPrizeScore);
        sb.append(", specialPrizeHandling=").append(specialPrizeHandling);
        sb.append(", specialPrizeScore=").append(specialPrizeScore);
        sb.append(", effectiveDate=").append(effectiveDate);
        sb.append(", description=").append(description);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}